package com.neegix.system.user.application.assembler;

import com.neegix.system.user.application.service.command.CreateUserCommand;
import com.neegix.system.user.application.service.command.UpdateUserCommand;
import com.neegix.system.user.domain.entity.UserEntity;
import com.neegix.system.user.infrastructure.repository.dataobject.UserDO;
import com.neegix.system.user.interfaces.vo.UserForListVO;
import com.neegix.system.user.interfaces.vo.UserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="https://www.neegix.com">https://www.neegix.com</a>.
  *
  * @author <a href="https://www.neegix.com">https://www.neegix.com</a>
  * @version 1.0.0
  * @since 2024-12-03 11:47:28
  */

@Mapper
public interface UserAssembler {
    UserAssembler INSTANCE = Mappers.getMapper(UserAssembler.class);

    @Mapping(target = "userType", ignore = true)
    UserEntity covertEntity(CreateUserCommand createUserCommand);

    @Mapping(target = "userType", ignore = true)
    UserEntity covertEntity(UpdateUserCommand updateUserCommand);


    List<UserForListVO> covertVO(List<UserDO> UserDOs);

    @Mapping(target = "userType", ignore = true)
    UserVO covertVO(UserEntity entity);
}